<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Application template - Include content page
 */
if (!function_exists('num_segment')) {

    function num_segment($segment_num, $start_url = NULL) {
        $CI = & get_instance();
        $j;
        if(is_null($start_url)) {
            $j = 1;
        }else {
            $j = $start_url;
            $segment_num +=2;
        }
        $url = "";
        for($i=$j; $i<=$segment_num; $i++) {
            $url .= $CI->uri->segment($i).'/';
        }
        return $url;
    }

}

// ------------------------------------------------------------------------

